package com.gc.server.dao;

import com.gc.server.entity.RouteEntity;
import com.gc.server.entity.SchoolEntity;
import com.gc.server.entity.ShopEntity;
import com.gc.server.vo.RouteVo;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * 路线Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Fri Oct 16 18:16:41 CST 2020
 */
@Mapper
public interface RouteDao extends BaseDao<RouteEntity> {

    List<RouteVo> findVo(RouteVo vo);

    RouteVo getVo(Long id);

   List<ShopEntity> findShop(Long routeId);

   //添加药店
    void addShop(@Param("routeId") Long routeId, @Param("shopIds") List<Long> shopIds);

    void addSchool(@Param("routeId") Long routeId, @Param("schoolIds") List<Long> schoolIds);
    //移除所有药店
    void rmShop(@Param("routeId") Long routeId);

    //移除所有学校
    void rmSchool(@Param("routeId") Long routeId);

    List<RouteEntity> findByUserId(Long userId);

    List<ShopEntity> findShopByUserId(Long userId);

    List<SchoolEntity> findSchoolByUserId(Long userId);
}
